package com.guaoran.interview;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Component;

@SpringBootApplication
// 开启对AspectJ 自动代理
@EnableAspectJAutoProxy(exposeProxy = true)
public class InterviewApplication {

	public static void main(String[] args) {
		SpringApplication.run(InterviewApplication.class, args);
	}

	@Component
	public class MyApplicationListener implements ApplicationListener{

		@Override
		public void onApplicationEvent(ApplicationEvent event) {
			System.err.println("事件 ... "+event);
		}
	}
}
